home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / bbsutil / gapdemo1.zip / ARCTRANS.BAT < prev    next >
DOS Batch File  |  1993-04-26  |  691b  |  30 lines

  1. @echo off
  2.  
  3. REM     Called by GAP to transfer a single file out of an archive
  4. REM     %1 = Where to put Extracted File (loose directory #1)
  5. REM     %2 = Full Path/Name of the Archive File to process
  6. REM     %3 = What kind of Archive it is: ARC,ZIP,ICE,LZH,PAK,etc
  7. REM     %4 = Name of the file to extract from the Archive
  8. REM     %5 = Name to use for the file once it is extracted and recompressed
  9.  
  10. if %3 == ZIP goto dozip
  11. if %3 == EXE goto dozip
  12. if %3 == ARC goto doarc
  13. if %3 == LZH goto dolzh
  14. goto end
  15.  
  16. :dozip
  17. pkunzip /o %2 %1\ %4
  18. pkzip /m  %1\%5 %1\%4
  19. goto end
  20.  
  21. :doarc
  22. arc eo %2 %1\ %4
  23. arc a %1\%5 %1\%4
  24. goto end
  25.  
  26. :dolzh
  27. lha e %2 %1\ %4
  28. lha a %1\%5 %1\%4
  29. :end
  30.